﻿create database TestDb
on
(
	name='TestD',
	size=8MB,
	filegrowth=1MB,
	maxsize=10MB,
	filename='C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\TestDb.mdf'
),
(
	name='TestDbs',
	size=8MB,
	filegrowth=1MB,
	maxsize=10MB,
	filename='C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\TestDb.ndf'
)
log on(
	name='TestDb',
	size=8MB,
	filegrowth=1MB,
	maxsize=10MB,
	filename='C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\TestDb_log.ldf'	
)
go
use TestDb
use master
drop database TestDb




create database conpany
on
(
	name='conpny',
	size=9MB,
	filegrowth=1MB,
	maxsize=11MB,
	filename='C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\conpany.mdf'
),
(
	name='conpny1',
	size=9MB,
	filegrowth=1MB,
	maxsize=11MB,
	filename='C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\conpany1.ndf'
)
log on
(
	name='conpny_log',
	size=9MB,
	filegrowth=1MB,
	maxsize=11MB,
	filename='C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\conpany_log.ldf'
)

go
backup database conpany
to disk='‪D:\sql\backup.bak'

restore database conpany
from disk=‪'‪D:\sql\backup.bak'